package com.teach;

/**
 * <pre>
 * -
 * Author : J.L.Zhou
 * E-Mail : 2233875735@qq.com
 * Tel : 151 1104 7708
 * Date : 2021-04-27 15:14
 * Version : 1.0
 * Copyright 2021 jlzhou.top Inc. All rights reserved.
 * Warning: this content is only for internal circulation of the company.
 *          It is forbidden to divulge it or use it for other commercial purposes.
 * </pre>
 **/
public class Demo01Test {

  public static void main(String[] args) {
    Demo01 d1 = new Demo01();
    d1.setName("d1");
    Demo01 d2 = new Demo01();
    d2.setName("d2");
    d1.run();//方法调用
    d2.start();//启动线程
    for (int i = 0; i < 10; i++) {
      System.out.println(Thread.currentThread().getName()+i);
      try {
        Thread.sleep(500);
      } catch (InterruptedException e) {
        e.printStackTrace();
      }
    }
  }
}
